package com.googlecode.xbeandatasource.common;

import java.util.Date;


/**
 * @author Johny Huang
 *
 */
public class EmployeeFactory {

	public final static Employee getCandy(){
		Employee candy=new Employee("Candy");
		candy.addJobTitle("Manager");
		candy.setAddress("China Guangzhou");
		
		Employee john=Employee.newEmployee("John");
		Employee bill=Employee.newEmployee("Bill");
		Employee apple=Employee.newEmployee("Apple");
		
		candy.addColleage(john).addColleage(bill).addColleage(apple);
		return candy;
	}
	
	public final static Employee getJohny(){
		Employee johny=new Employee("Johny");
		johny.setBirthday(new Date());
		johny.setGender(Employee.MALE);
		johny.addColleage(getCandy())
		     .addColleage(getTom())
		     .addJobTitle("Software Engineer")
		     .addJobTitle("CTO")
		     .addJobTitle("COO")
		     .addFamilyMember("Father", "Sucrate")
		     .addFamilyMember("Brother", "Jothan");
		return johny;
	}
	
	public final static Employee getTom(){
		Employee tom=new Employee("Tom");
		tom.setAddress("India");
		tom.addJobTitle("Engineer")
		   .addFamilyMember("wife", "Josphy");
		return tom;
	}
}
